Skip to content

Conversation

@SanjulaGanepola
Copy link
Member

Changes

  • Add red error decoration for invalid libraries in the library list. This is just to make it more visible to the user (related to No specific warning when library list becomes invalid #2931).
    image
  • Add library icon to libraries in the library list
  • Automatically refresh the library list if a library in the library list is deleted from the Object Browser

How to test this PR

  1. Create a new library
  2. Add it to the library list
  3. Delete the library
  4. Observe that the library list was refreshed and the deleted library has a red error decoration

Checklist

  • have tested my change

@github-actions
Copy link
Contributor

github-actions bot commented Oct 21, 2025

👋 A new build is available for this PR based on d146e0c.

Copy link
Collaborator

@chrjorgensen chrjorgensen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@SanjulaGanepola Great PR, learned some new stuff about decorators. 😃

Almost there, see other comment.

@SanjulaGanepola
Copy link
Member Author

@chrjorgensen Ready for review again!

Copy link
Collaborator

@chrjorgensen chrjorgensen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One issue found - see comment.

And we should not ask for adding the new library to the library list, if it's already there... right?

@chrjorgensen chrjorgensen added this to the 3.0.0 milestone Nov 1, 2025
Co-authored-by: Christian Jorgensen <[email protected]>
@github-actions
Copy link
Contributor

👋 A new build is available for this PR based on 8a280ae.

@SanjulaGanepola
Copy link
Member Author

@chrjorgensen Good point, I fixed that! I also noticed that we previously always added a filter to the Object Browser even when the library fails to create. I changed this as well to only do so if it created successfully. Ready for review

Copy link
Member

@sebjulliand sebjulliand left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Works as advertised and code looks good.
It can be merged, as far as I'm concerned.
@chrjorgensen, do you want to have one final look?

Copy link
Collaborator

@chrjorgensen chrjorgensen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@SanjulaGanepola If @sebjulliand is happy, then I'm happy. 😆

I didn't complete my test since I was on my Linux partition and didn't have access to my own IBM i partitions for library creation/deletion tests. @sebjulliand did the test, so I will approve and merge.

}
});
}
} else {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@SanjulaGanepola
Not an issue, since the code is working - but this is a great example of the benefit of coding early exits: If you reversed the test for library created and moved this code right after the test and added a return, you could avoid indenting all the remaining code. Try googling "never nester"... 😉

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good point, will keep that in mind for next time.

I also did just look it up and saw many interesting ways people stick to only three levels of depth. Very interesting!

@chrjorgensen chrjorgensen merged commit d1f219d into master Nov 17, 2025
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

No specific warning when library list becomes invalid

4 participants